package com.example.demo.service.impl;

import com.example.demo.entity.Organ;
import com.example.demo.mapper.OrganMapper;
import com.example.demo.service.OrganService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrganServiceImpl implements OrganService {
    @Autowired
    private OrganMapper organMapper;

    @Override
    public List<Organ> findAllOrgan(String mname,String sort,String order) {
        return organMapper.findAllOrgan(mname,sort,order);
    }

    @Override
    public void removeBatch(String[] mids) {
         organMapper.removeBatch(mids);
    }

    @Override
    public void delByMid(String mid) {
        organMapper.delByMid(mid);
    }

    @Override
    public void addOrgan(Organ o) {
        organMapper.addOrgan(o);
    }

    @Override
    public Organ getByMid(Integer mid) {
        return organMapper.getByMid(mid);
    }

    @Override
    public void modifyOrgan(Organ o) {
        organMapper.modifyOrgan(o);
    }
}
